<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <base href="<%=basePath%>">
    
	<%@include file="/jsp/common/jspCommonHeadSetting.jsp"%>
	<%@include file="/jsp/common/adminCommonHeadSetting.jsp"%>
	
	<script type="text/javascript" src="<c:url value="/js/userInfoValidation.js" />" charset="utf-8"></script>
	<script type="text/javascript" src="<c:url value="/js/admin/adminAddUserValidation.js" />" charset="utf-8"></script>
	<link href="<c:url value="css/admin/adminAddUser.css"/>" type="text/css" rel="stylesheet" />

	<title>network</title>
  </head>
  
  <body>
  <div id="wrap">
  	<%@include file="/jsp/common/header.jsp"%>
    <div id="content">
    	<%@include file="/jsp/common/adminLeftContent.jsp"%>
    	<div id="right_content">
			<div class="title">
				添加用户信息
			</div>
			<div id="input_area">
			<s:form action="/admin/addUser.action" namespace="/" onsubmit="return check();">
				
				<div>
					<span class="input_line"><s:textfield id="username" label="用户名" name="user.userName"></s:textfield></span>
				</div>
				<div>
					<span class="input_line"><s:password id="pwd" label="密码" name="user.password"></s:password></span>
				</div>
				<div>
					<span class="input_line"><s:password id="pwdconfirm" label="确认密码" name="pwdconfirm"></s:password></span>
				</div>
				<div>
					<span class="input_line"><s:textfield id="name" label="姓名" name="user.name"></s:textfield></span>
				</div>
				<div>
					<span class="input_line"><s:textfield id="school" label="学校" name="user.school"></s:textfield></span>
				</div>
				<div>
					<span class="input_line"><s:textfield id="college" label="学院" name="user.college"></s:textfield></span>
				</div>
				<div>
					<span class="input_line"><s:textfield id="email" label="Email" name="user.email"></s:textfield></span>
				</div>
				<div>
					<span class="input_line">
					<s:select label="类型" name="user.role" list="#{'A':'管理员','U':'用户'}"
					listKey="key" listValue="value"/>
					</span>
				</div>
				<div>
					<span class="input_line"><s:submit name="submit" value="提 交" ></s:submit>
					</span>
				</div>
			</s:form>
			</div>
		</div>
    </div>
  </div>
  </body>
</html>